﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;
using Modelo;
using Proceso;
namespace Interface
{
    /// <summary>
    /// Interaction logic for SeleccionarLote.xaml
    /// </summary>
    public partial class SeleccionarLote : Window
    {
        Producto producto;
        public SeleccionarLote(Producto producto)
        {
            InitializeComponent();
            this.producto = producto;
        }

        private void button1_Click(object sender, RoutedEventArgs e)
        {
            try
            {
                GestorAlmacen.RegistrarUnAlmacén(producto, textBoxCant.Text, textBoxStock.Text, datePickerFin.SelectedDate.ToString(), datePickerIni.SelectedDate.ToString());
                MessageBox.Show("Registro exitoso");
            }
            catch (Exception ex)
            {
                MessageBox.Show("Hubo un error : "+ex.Message);
            }
        }
    }
}
